package com.CampusLife.service.impl;

import  com.CampusLife.bean.LostProduct;
import  com.CampusLife.dao.ILostProductDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import  com.CampusLife.service.ILostProductService;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class LostProductServiceImpl  implements ILostProductService {
    @Resource
    private ILostProductDao iLostProductDao;

    @Override
    public List<LostProduct> queryAll() {
        return iLostProductDao.queryAll();
    }

    @Override
    public LostProduct queryById(Integer l_id) {
        return iLostProductDao.queryById(l_id);
    }

    @Override
    public void add(LostProduct lostProduct) {
        iLostProductDao.add(lostProduct);
    }

    @Override
    public void update(LostProduct lostProduct) {

        iLostProductDao.update(lostProduct);
    }

    @Override
    public    void delete(Integer l_id) {
        iLostProductDao.delete(l_id);
    }

    @Override
    public  List<LostProduct> selectByName(String lost_name){
      return   iLostProductDao.selectByName(lost_name);
    }

    @Override
    public List<LostProduct> getProductAll() {
        List<LostProduct> lostProduct=iLostProductDao.getProductAll();
        return  lostProduct;
    }

    @Override
    public List<LostProduct> getProductAllByLostName(LostProduct lostProduct) {
        List<LostProduct> lostProduct1=iLostProductDao.getProductAllByLostName(lostProduct);
        return  lostProduct1;
    }

    @Override
    public List<LostProduct> getLostProductByType(int l_tid) {
        List<LostProduct> lostProduct=iLostProductDao.getLostProductByType(l_tid);
        return lostProduct;
    }

    @Override
    public List<LostProduct> getOrder() {
        return iLostProductDao.getOrder();
    }

    @Override
    public LostProduct getLostProductById(int l_id) {
        LostProduct lostProduct=iLostProductDao.getLostProductById(l_id);
        return lostProduct;
    }

    @Override
    public List<LostProduct> queryByName(String lost_name) {
        return iLostProductDao.queryByName(lost_name);
    }
    @Override
    public List<LostProduct> getLostProductByUserId(Integer id) {
        return iLostProductDao.getLostProductByUserId(id);
    }
}
